import requests
import json
url = 'https://fanyi.baidu.com/sug'
kw = input("输入要翻译的字：")
param = {'kw': kw}
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36'}
resp = requests.post(url=url,params=param,headers=headers)
data = json.loads(resp.text)
print(data['data'][0]['v'])
